function model_implied=solve_eqm_calibration(beta,phi,phiR,phiC,HC,HR,gamma,kappa,A)
%%% Input

% phi: collateral para
% phiR: collateral para
% phiC: collateral para
% HC: Housing Supply to Commercial
% residential_share:  HR/(HC+HR)
% gamma: share of refugee in find individual housing, i.e. residential sector
% kappa: share of refugee
% A: technology level

%%% Parameters Fixed

R = 1.0082; %% real rate 2009-2014
r=R-1;
omega = 0.56/(1-0.56); %% housing in total asset =0.56
alpha=0.38; %% Prod Fn Para

hR_re =12*354/31308*omega; %% subsidy per capita/(GNI per capita LCU)*omega %% WDI data for German GNI per capita current LCU in 2008
hC_re =12*354/31308*omega;
tau=12*354/31308*(1+omega); %% subsidy per capita/(GNI per capita LCU)*(1+omega)



Gamma_1 = 1-phi*r-r*phiC*alpha*beta*(1+phi*(1-beta*R))/(1-beta-beta*phiC*(1-beta*R));
hR =  HR-kappa*gamma*hR_re;
hC =  HC-kappa*(1-gamma)*hC_re;
y =  A*hC^alpha;
pC = beta*(1+phi*(1-beta*R))/(1-beta-beta*phiC*(1-beta*R))*alpha*A*hC^(alpha-1);
c = (Gamma_1*y-kappa*tau)...
    /(1+r*phiR*beta*omega/(1-beta-beta*phiR*(1-beta*R)));
pR =  beta*omega/(1-beta-beta*phiR*(1-beta*R))*c/hR;


model_implied=[hR hC y c pC pR];